package com.project.slsx.adapter;

import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.util.pool.GlideTrace;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.project.slsx.R;
import com.project.slsx.bean.StorageBean;
import com.project.slsx.utils.GlideUtils;

public class StorageListAdapter extends BaseQuickAdapter<StorageBean.ResultBean, BaseViewHolder> {
    public StorageListAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder holder, StorageBean.ResultBean item) {
        RequestOptions option = GlideUtils.getOption();
        ImageView ivThumb = holder.getView(R.id.iv_storage);
        Glide.with(mContext).load(item.getThumb()).apply(option).into(ivThumb);
        holder.setText(R.id.tv_storage_item_name,item.getTitle());
    }
}
